/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/bluetooth.html#wxcreatebleconnectionobject)
 * @param deviceId [string]用于区分设备的 id
 */

export default function create_ble_connection(deviceId: string) {
	return new Promise<boolean>((resolve, reject) => {
		wx.createBLEConnection({
			deviceId,
			success() {
				resolve(true);
			},
			fail() {
				reject(false);
			}
		});
	});
}
